<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <script type="text/javascript" src="/lib/haha/core/start.js"></script>
    <link rel="stylesheet" href="CSS/resourseDetail.css">
    <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
</head>

<body>
    <div id="header"></div>
    <div class="container">
        <div id="saveBox"
            style="min-height:460px;border: 1px solid #CCCCCC;margin-top: 30px;background-color: #ffffff;">
            <script id='detailInfo' type="text/html">
            <p class="title">{{:#data['title']}}</p>
            <!-- 封面 -->
            <div class="posterBox flex-b posterULBox">
                <ul class="detailContent flex-w-b posterUl">
                    <li class="flex-r-b"><span class='name'>作者：</span><span class="gray">
                            <span class="">{{:#data['author']}}</span>
                        </span></li>
                    <li class="flex-r-b"><span class='name1'>刊名/会议名称：</span><span class="gray"><span
                                class="">{{:#data['bookName']}}</span></span></li>
                    <li class="flex-r-b"><span class='name'>年：</span><span
                            class="gray">{{:#data['year']}}</span></li>
                            <li class="flex-r-b"><span class=''>期/卷：</span><span
                                class="gray">{{:#data['stage']}}</span></li>
                    <li class="flex-r-b large"><span class='name'>关键词：</span><span class="gray"> {{for
                            keyWord.split(';')}}
                            <span class="">{{:#data}}</span>
                            {{/for}}
                        </span></li>
                    <li class="flex-r-b large"><span class='name'>摘要：</span>
                                <span id="spanText" class="text">{{:#data['digest']}} </span>
                    </li>
                    <li class='large'>
                        <ul class="btns flex">
                            <li class="save" data-tablename='{{:#data["tableCode"]}}'  data-dbname='{{:#data["dataSource"]}}' data-sysid='{{:#data["sysId"]}}'  data-filename='{{:#data["fileName"]}}'   data-title='{{:#data["title"]}}' data-ipAddress={{:~ipAddress(#data,#index)}}>收藏</li>
                            <li class='download'  data-tablename='{{:#data["tableCode"]}}'  data-dbname='{{:#data["dataSource"]}}' data-sysid='{{:#data["sysId"]}}'  data-filename='{{:#data["fileName"]}}'    data-title='{{:#data["title"]}}' data-digitfilename='{{:#data["digitFileName"]}}'>下载</li>
                            <li class='preview'  data-tablename='{{:#data["tableCode"]}}'  data-dbname='{{:#data["dataSource"]}}' data-sysid='{{:#data["sysId"]}}'  data-filename='{{:#data["fileName"]}}'    data-title='{{:#data["title"]}}' data-digitfilename='{{:#data["digitFileName"]}}'>预览</li>
                        </ul>
                    </li>
                </ul>
            </div>
            </script>
        </div>
        <!-- 相似文献 -->
        <!-- <div class="relative">
            <p class="relativeTitle">相似文献</p>
            <ul>
                <li class="flex-between">
                    <p><span>1.</span><span>石油石油石油石油石油石油石油石油石油石油石油石油石油石油</span></p>
                    <p>作者</p>
                </li>
                <li class="flex-between">
                    <p><span>1.</span><span>石油石油石油石油石油石油石油石油石油石油石油石油石油石油</span></p>
                    <p>作者</p>
                </li>
                <li class="flex-between">
                    <p><span>1.</span><span>石油石油石油石油石油石油石油石油石油石油石油石油石油石油</span></p>
                    <p>作者</p>
                </li>
                <li class="flex-between">
                    <p><span>1.</span><span>石油石油石油石油石油石油石油石油石油石油石油石油石油石油</span></p>
                    <p>作者</p>
                </li>
            </ul>
        </div> -->
    </div>
    <div id="footer"></div>
    <!-- 收藏弹窗 -->
    <div id='saveClassify' class='saveClassify' style="display: none;"></div>
    <!-- 侧边固定按钮 -->
    <script type="text/javascript" src="/lib/layer-v3.1.1/layer/layer.js"></script>
    <script src="/lib/layui/layui.js"></script>
    <script type="text/javascript">
        var authorRelate = '',
            organRelate = '',
            keyWordRelate = '',
            vsmen = '',
            vsm = '',
            title = '',
            text = '';
        shared.useLayout("act-1", '/periodical.html');
        $(function () {
            var dataDetail = {};
            var sysId = base.getQueryParam('sysId');
            var tableCode = base.getQueryParam('tableCode');
            getDetail(sysId);
            function getDetail(sysId) {
                shared.ajaxPost(config.getIndex, { sysId: sysId, tableCode: tableCode }, function (res) {
                    console.log(res);
                    // 插入浏览量
                    dataDetail = res;
                    authorRelate = res.authorRelate;
                    organRelate = res.organRelate;
                    keyWordRelate = res.keyWordRelate;
                    vsmen = res.vsmen;
                    vsm = res.vsm;
                    title = res.title;
                    core.useTemplateAuto('detailInfo', res, {
                        ipAddress: function (data, index) {
                            return window.location.search;
                        }
                    });

                    //插入浏览量
                    pageData.isYLVisited({
                        sysId: res.sysId,
                        tableCode: res.tableCode,
                        title: res.title,
                        dataSource: res.dataSource,
                        detailUrl: window.location.pathname,
                        ipAddress: window.location.search,
                    }, config.insertView)
                })
            }
            $('#saveBox').click(function (e) {
                if ($(e.target).hasClass('save')) {
                    if (!shared.getCookie('token')) {
                        window.location.href = '/login.html'
                        return;
                    }
                    pageData.savePop('#saveClassify', 'saveDocument', 'inner', $(e.target));
                } else {
                    pageData.threePart(dataDetail, $(e.target))
                }
            })

        })
    </script>
</body>

</html>